package com.tedu._01mvcboot01.controller;

import com.tedu._01mvcboot01.pojo.dto.VehicleAddDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class VehicleController {
    @RequestMapping("/v1/vehicle/addVehicle")
    @ResponseBody
//    1.使用方法参数接收前端传输的数据
//    public String addVehicle(String brand,String license,Double price){
//        System.out.println(brand+"-"+license+"-"+price);
//        return "添加成功";
//    }
    public String addVehicle(VehicleAddDTO vehicleAddDTO){
        System.out.println(vehicleAddDTO.toString());
        return "添加成功";
    }
}
